﻿<!--
    This file is part of "Information Connections Engine".

    "Information Connections Engine" is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    "Information Connections Engine" is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with "Information Connections Engine".  If not, see http://www.gnu.org/license.
-->
<UserControl x:Class="ICE.view.NodeView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
             Width="300" xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">
    <Grid x:Name="container" Cursor="Hand">
    	<vsm:VisualStateManager.VisualStateGroups>
    		<vsm:VisualStateGroup x:Name="Selection">
    			<vsm:VisualStateGroup.Transitions>
    				<vsm:VisualTransition GeneratedDuration="00:00:00.5000000" To="normal"/>
    				<vsm:VisualTransition GeneratedDuration="00:00:00.5000000" To="selected"/>
    				<vsm:VisualTransition GeneratedDuration="00:00:00.5000000"/>
    			</vsm:VisualStateGroup.Transitions>
    			<vsm:VisualState x:Name="normal"/>
    			<vsm:VisualState x:Name="selected">
    				<Storyboard>
    					<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="selectionLight" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
    						<SplineColorKeyFrame KeyTime="00:00:00" Value="#AAFFFFFF"/>
    					</ColorAnimationUsingKeyFrames>
    					<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="selectionLight" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
    						<SplineColorKeyFrame KeyTime="00:00:00" Value="#3DFFFFFF"/>
    					</ColorAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="selectionLight" Storyboard.TargetProperty="(Shape.Fill).(Brush.RelativeTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.063"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="selectionLight" Storyboard.TargetProperty="(Shape.Fill).(Brush.RelativeTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.065"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="selectionLight" Storyboard.TargetProperty="(Shape.Fill).(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="selectionLight" Storyboard.TargetProperty="(Shape.Fill).(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Shadow" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
    					</DoubleAnimationUsingKeyFrames>
    					<PointAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="selectionLight" Storyboard.TargetProperty="(Shape.Fill).(RadialGradientBrush.GradientOrigin)">
    						<SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,0.5"/>
    					</PointAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    		</vsm:VisualStateGroup>
    		<vsm:VisualStateGroup x:Name="CoreLayout">
    			<vsm:VisualState x:Name="SphereCoreLayout">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="sphere" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    					</DoubleAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    			<vsm:VisualState x:Name="NoCoreLayout">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="sphere" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    			<vsm:VisualState x:Name="ImageCoreLayout">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="sphere" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.995"/>
    					</DoubleAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    		</vsm:VisualStateGroup>
    		<vsm:VisualStateGroup x:Name="TextLayout">
    			<vsm:VisualState x:Name="CenterTextLayout">
    				<Storyboard>
    					<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="label" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
    						<DiscreteObjectKeyFrame KeyTime="00:00:00">
    							<DiscreteObjectKeyFrame.Value>
    								<VerticalAlignment>Center</VerticalAlignment>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="label" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    					</DoubleAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    			<vsm:VisualState x:Name="NoTextLayout">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="label" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    					</DoubleAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    			<vsm:VisualState x:Name="BottomTextlayout">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="label" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    					</DoubleAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="label" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
    						<DiscreteObjectKeyFrame KeyTime="00:00:00">
    							<DiscreteObjectKeyFrame.Value>
    								<VerticalAlignment>Bottom</VerticalAlignment>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    			<vsm:VisualState x:Name="TopTextLayout">
    				<Storyboard>
    					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="label" Storyboard.TargetProperty="(UIElement.Opacity)">
    						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    					</DoubleAnimationUsingKeyFrames>
    					<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="label" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
    						<DiscreteObjectKeyFrame KeyTime="00:00:00">
    							<DiscreteObjectKeyFrame.Value>
    								<VerticalAlignment>Top</VerticalAlignment>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    		</vsm:VisualStateGroup>
    	</vsm:VisualStateManager.VisualStateGroups>
    	<Grid Margin="134,0,134,0" x:Name="sphere">
    		<Ellipse x:Name="Shadow" Stroke="Black" StrokeThickness="0" Opacity="1" Height="32" Width="32">
    			<Ellipse.Fill>
    				<RadialGradientBrush>
    					<GradientStop Color="#FF000000" Offset="0.844"/>
    					<GradientStop Color="#00000000" Offset="1"/>
    				</RadialGradientBrush>
    			</Ellipse.Fill>
    		</Ellipse>
    		<Ellipse x:Name="ellipse" Fill="#FF2B7288" Stroke="Black" StrokeThickness="0" Opacity="1" Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" Width="30"/>
    		<Ellipse x:Name="reflect2" StrokeThickness="0" Opacity="1" RenderTransformOrigin="0.496,0.51" Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" Width="30">
    			<Ellipse.Fill>
    				<RadialGradientBrush>
    					<RadialGradientBrush.RelativeTransform>
    						<TransformGroup>
    							<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="0.92" ScaleY="0.81"/>
    							<SkewTransform CenterX="0.5" CenterY="0.5" AngleY="-0.819"/>
    							<RotateTransform CenterX="0.5" CenterY="0.5"/>
    							<TranslateTransform X="-0.01" Y="-0.072"/>
    						</TransformGroup>
    					</RadialGradientBrush.RelativeTransform>
    					<GradientStop Color="#30000000"/>
    					<GradientStop Color="#00000000" Offset="1"/>
    				</RadialGradientBrush>
    			</Ellipse.Fill>
    		</Ellipse>
    		<Ellipse x:Name="reflect" StrokeThickness="0" Opacity="1" RenderTransformOrigin="0.496,0.51" Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" Width="30">
    			<Ellipse.Fill>
    				<RadialGradientBrush>
    					<RadialGradientBrush.RelativeTransform>
    						<TransformGroup>
    							<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.284" ScaleY="0.921"/>
    							<SkewTransform CenterX="0.5" CenterY="0.5"/>
    							<RotateTransform CenterX="0.5" CenterY="0.5"/>
    							<TranslateTransform X="-0.004" Y="-0.236"/>
    						</TransformGroup>
    					</RadialGradientBrush.RelativeTransform>
    					<GradientStop Color="#FFFFFFFF"/>
    					<GradientStop Color="#25FFFFFF" Offset="1"/>
    				</RadialGradientBrush>
    			</Ellipse.Fill>
    		</Ellipse>
    		<Ellipse x:Name="selectionLight" StrokeThickness="0" Opacity="1" RenderTransformOrigin="0.496,0.51" Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" Width="30">
    			<Ellipse.Fill>
    				<RadialGradientBrush GradientOrigin="0.498,0.756">
    					<RadialGradientBrush.RelativeTransform>
    						<TransformGroup>
    							<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.004" ScaleY="0.995"/>
    							<SkewTransform CenterX="0.5" CenterY="0.5"/>
    							<RotateTransform CenterX="0.5" CenterY="0.5"/>
    							<TranslateTransform X="0.002" Y="0.003"/>
    						</TransformGroup>
    					</RadialGradientBrush.RelativeTransform>
    					<GradientStop Color="#00FFFFFF"/>
    					<GradientStop Color="#00FFFFFF" Offset="1"/>
    				</RadialGradientBrush>
    			</Ellipse.Fill>
    		</Ellipse>
    	</Grid>
    	<Grid HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="grid">
    		<Image VerticalAlignment="Center" Stretch="Fill" HorizontalAlignment="Center" x:Name="image" Width="30" Height="30"/>
    	</Grid>
        <TextBlock x:Name="label" HorizontalAlignment="Center"  VerticalAlignment="Center" ><Run Text=""/></TextBlock>
    </Grid>
</UserControl>
